#ifndef QUESTIONDETAILDIALOG_H
#define QUESTIONDETAILDIALOG_H

#include "dialogbase.h"
#include "ui_questiondetaildialog.h"
#include "tableschema.h"

class QuestionDetailDialog : public DialogBase<Ui_questionDetailDialog>
{
    Q_OBJECT

public:
    QuestionDetailDialog( QWidget * parent );
    QuestionDetailDialog( QWidget * parent, const Question & question );
    const Question & question() const;
    ~QuestionDetailDialog();

private slots:
    void onQuestionTextChanged();
    void onAnswerTextChanged();
    void onValueSpinboxChanged( int value );

private:
    void init();
    void enableSavePushButton();

private:
    Question m_questionOld;
    Question m_question;
};

#endif
